const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  filenameHashing:false,
  lintOnSave:false,
  configureWebpack:{
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      }),
      new NodePolyfillPlugin()
    ],
  },
  devServer: {
    proxy: {
        '/api': {
            target: 'http://localhost:8088',
            changeOrigin: true,
            // ws:false
            // pathRewrite: {
            //     '/api': ''
            // }
        }
    }
}
  
})
